/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package polybook.view;

import javax.swing.JProgressBar;
import polybook.utils.Log;
import polybook.utils.ProcessCallBackable;

/**
 *
 * @author epulapp
 */
public class InfosProgressViewUpdater implements ProcessCallBackable {

    private JProgressBar progressBar;

    public InfosProgressViewUpdater(JProgressBar progressBarRef) {
        this.progressBar = progressBarRef;
        this.progressBar.setValue(0);
        this.progressBar.setMinimum(0);
        this.progressBar.setMaximum(100);
    }

    @Override
    public void callback(Object value) {
        this.progressBar.setValue(Math.round((Float) value * 100));
    }
}
